package wt.hpad.activity.detail;

import java.util.List;

import wt.hpad.model.bean.DishDetail;

/**
 * Created by wt on 12.25.
 */

public class DetailPresenter implements DetailContract.Presenter {
    DetailContract.View mDetailFragment;
    List<DishDetail> mDatas;

    public DetailPresenter(DetailContract.View view, List<DishDetail> datas) {
        mDatas = datas;
        mDetailFragment = view;
        mDetailFragment.setPresenter(this);
    }

    @Override
    public void subscribe() {
        // 处理获取的dishdetails 数据
    }

    @Override
    public void unsubscribe() {
        mDetailFragment = null;
        if (mDatas != null) {
            mDatas.clear();
            mDatas = null;
        }
    }

    public List<DishDetail> getDatas() {
        return mDatas;
    }
}
